﻿using AdventureWorks.Domain;
using FluentNHibernate.Mapping;
namespace AdventureWorks.DataAccess.Mappings
{
    public class ProductInventoryMapping : ClassMap<ProductInventory>
    {
        public ProductInventoryMapping() : base()
        {
            Table("ProductInventory");
            Schema("Production");
            CompositeId()
                .KeyReference(x => x.Product, "ProductID")
                .KeyReference(x => x.Location, "LocationID");
            Map(x => x.Quantity);
            Map(x => x.Shelf);
            Map(x => x.Bin);
        }
    }
}
